﻿<%@ WebHandler Language="C#" Class="SizeMate_Del" %>

using System;
using System.Web;
using System.Text;
using Newtonsoft.Json;
public class SizeMate_Del : IHttpHandler, System.Web.SessionState.IReadOnlySessionState
{
    
    public void ProcessRequest (HttpContext context) {
 //检验是否登录
         
        if (!OTS.BaseLogin.validataModule(context, (int)OTS.enumSysRight.SizeManager))
        {
            context.Response.ContentType = "text/json";
            context.Response.Write("非法操作！");
            return;

        }
        else
        {
            string _matId = context.Request["MatId"];
           OTS.BLL.ProductSizeBLL bll = new OTS.BLL.ProductSizeBLL();

           OTS.Model.size_All sizeAll = bll.GetAllSizeAndValue(int.Parse( _matId));
           context.Response.ContentType = "application/x-json";
           context.Response.Charset = "utf-8";
           context.Response.Write(JavaScriptConvert.SerializeObject(sizeAll));
 
       }

        
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}